﻿using System;
using System.Collections.Generic;
using Core.DataAccess.Model.Projects;
using Core.Framework.Model.Common;

namespace Core.IBusiness.IProjectModule
{
    /// <summary>
    /// 项目管理
    /// </summary>
    public interface IProject : IProjectPayInfo
    {

        /// <summary>
        /// 项目信息操作
        /// </summary>
        /// <param name="model"></param>
        /// <param name="sqlExecType"></param>
        /// <returns></returns>
        MethodResult<int> ProjectExec(ProjectList model, SqlExecType sqlExecType);

        /// <summary>
        /// 验证项目信息
        /// </summary>
        /// <param name="userKey">用户ID</param>
        /// <param name="projectToken">项目Token</param>
        MethodResult<ProjectList> IsExist(int userKey, string projectToken);

        /// <summary>
        /// 获取项目信息
        /// </summary>
        /// <returns>T项目信息实体</returns>
        /// <param name="userKey">用户ID</param>
        /// <param name="projectToken">项目Token</param>
        MethodResult<ProjectList> GetProjectInfo(int userKey, string projectToken);

        /// <summary>
        /// 获取项目信息
        /// 支付信息
        /// </summary>
        /// <returns>T项目信息实体</returns>
        /// <param name="scheme">配置URL</param>
        MethodResult<ProjectList> GetProjectInfoAndPayInfoByScheme(string scheme);

        /// <summary>
        /// 获取项目列表
        /// </summary>
        /// <returns>T项目信息实体</returns>
        /// <param name="userKey">用户ID</param>
        /// <param name="search">索引值</param>
        /// <param name="pagination">分页参数</param>
        MethodResult<List<ProjectList>> GetProjectList(int userKey, string search, Pagination pagination);

    }
}
